Skip to content

Merge pull request #554 from alphagov/check-post-decomission-take2 #39

Merge pull request #554 from alphagov/check-post-decomission-take2

Merge pull request #554 from alphagov/check-post-decomission-take2 #39

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@8f152de45cc393bb48ce5d89d36b731f54556e65
with:
node-version: "${{env.NODE_VERSION}}"
- name: Setup Ruby
uses: ruby/setup-ruby@af848b40be8bb463a751551a1180d74782ba8a72
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@a753861a5debcf57bf8b404356158c8e1e33150c
with:
path: 'build'
- name: Deploy to GitHub pages
id: deployment
uses: actions/deploy-pages@13b55b33dd8996121833dbc1db458c793a334630
- name: Slack notify on failure
if: failure()
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117
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