Skip to content

Merge pull request #569 from alphagov/dependabot-bundler-govuk_tech_d… #52

Merge pull request #569 from alphagov/dependabot-bundler-govuk_tech_d…

Merge pull request #569 from alphagov/dependabot-bundler-govuk_tech_d… #52

Workflow file for this run

---
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@60edb5dd545a775178f52524783378180af0d1f8
with:
node-version: "${{env.NODE_VERSION}}"
- name: Setup Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7
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@56afc609e74202658d3ffba0e8f6dda462b719fa
with:
path: 'build'
- name: Deploy to GitHub pages
id: deployment
uses: actions/deploy-pages@decdde0ac072f6dcbe43649d82d9c635fff5b4e4
- 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