This website was archived Nov 2018. To make sure you're getting the most up-to-date information about DTA, see our current site.
www.dta.gov.au is a Jekyll website.
To get a local development environment on macOS:
# install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install rbenv
brew install rbenv ruby-build
# Add rbenv to bash so that it loads every time you open a terminal
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile
# Install developer tools
xcode-select --install
# Install Ruby
rbenv install 2.3.3
# Install node.js
brew install node
# Clone the repo into the current directory
git clone [email protected]:AusDTO/dta-website.git
# Install Bundler and install all gem dependencies
cd dta-website
gem install bundler
bundler install
After installing the dependencies you can run the site locally with:
bundle exec jekyll serve
You should then be able to see the site at: http://127.0.0.1:4000
Whenever you make a change, it can take up to 30 seconds for jekyll to re-build the site and show your change. You may
instead wish to start the site with bin/servefast.sh
. This will reduce the build time by disabling the search plugin
and only rendering the latest post.
The test are automatically run in CircleCI, but you can run the tests locally with:
bin/cibuild.sh
bin/citest.sh
External links are not tested as part of CI in bin/citest.sh
to keep test results reproducible.
You can separately test external links with:
bin/checkexternal.sh
The site can be tested for accessibility using pa11y.
Install pa11y-ci and it's dependencies with:
npm install -g [email protected]
npm install pa11y-ci@^1.1
You can then run the test with:
bin/checkaccessibility.sh
Issues are tracked on GitHub and are best viewed using waffle.
The default branch is develop
which is continuously deployed by circleCI to https://dta-website.apps.y.cld.gov.au/
The production branch is master
which is continuously deployed by circleCI to https://www.dta.gov.au/
When starting a new change, branch from develop
.
If needed a branch can be continuously deployed by circleCI to a staging site at https://dta-website-branchname.apps.y.cld.gov.au/. As long as the circleCI tests are passing, this staging site will be kept up to date with all commits to the branch. To start continuously deploying a branch, add the branch name to DEPLOY_BRANCHES
in bin/buildrc
. We have a quota for the number of running apps, so when you are finished you should remove the branch from DEPLOY_BRANCHES
and delete the app by running cf delete dta-website-<branchname>
.
When your change is ready, submit a PR to the develop
branch. After the PR is merged, it will be deployed to staging.
When ready for a production deploy, merge the develop
branch to master
. You can do this through Github with a PR.
The dta-website repository is public. All content including drafts is publicly accessible.
If you need to draft content which is embargoed, you need to use the private repository.
You should keep the content on a new branch, i.e. do NOT merge to develop
or master
.
When the content is ready to be published and approved for release, the content needs to first be merged into a branch in the public repository.
This must be done on the command line:
git clone [email protected]:AusDTO/dta-website.git
cd dta-website
git remote add private [email protected]:AusDTO/dta-website-private.git
git fetch private
git checkout private/branchname
git checkout -b branchname
git rebase -i origin/develop
# squash any commits if requiredgit push origin
# pushes the branch to the public repositoryThe branch can now be worked on in the public repository and merged via a PR to develop
as normal.
dta-site-cdn-logs
CF_PROD_API
CF_STAGING_API
CF_USER
CF_PASSWORD
CF_ORG
CF_SPACE
CF_BASIC_AUTH_USERNAME [optional]
CF_BASIC_AUTH_PASSWORD [optional]