Merge pull request #548 from alphagov/dependabot/github_actions/actio… #116
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 | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
deploy: | |
name: Deploy Team Manual | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | |
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 #v4.0.1 | |
with: | |
node-version: "14" | |
- uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 #v1.171.0 | |
with: | |
bundler-cache: true | |
- name: Build middleman site | |
id: build | |
run: bundle exec middleman build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 | |
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 Team Manual with commit ${{ github.sha }} FAILED." | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |