Merge pull request #565 from alphagov/dependabot-bundler-nokogiri-1.16.2 #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
env: | |
NODE_VERSION: "12.x" | |
PYTHON_VERSION: "3.x" | |
jobs: | |
deploy: | |
name: Deploy Tech Docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Setup Node | |
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 | |
with: | |
node-version: "${{env.NODE_VERSION}}" | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@bd03e04863f52d169e18a2b190e8fa6b84938215 | |
with: | |
bundler-cache: true | |
- name: Setup Python | |
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c | |
with: | |
python-version: "${{env.PYTHON_VERSION}}" | |
- name: Install Python and Node dependencies | |
run: | | |
npm ci | |
pip install --user -r requirements.txt | |
- name: Node tests | |
run: npm test | |
- name: Python tests | |
run: | | |
gem install webrick | |
make test | |
- name: Build middleman site | |
run: make build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 | |
with: | |
path: 'build' | |
- name: Deploy to GitHub pages | |
id: deployment | |
uses: actions/deploy-pages@87c3283f01cd6fe19a0ab93a23b2f6fcba5a8e42 | |
- name: Slack notify on failure | |
if: failure() | |
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 | |
with: | |
payload: | | |
{ | |
"text": "Deployment of Paas Tech Docs with commit ${{ github.sha }} FAILED." | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |