Merge pull request #517 from alphagov/dependabot/github_actions/actio… #80
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@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0 | |
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d #v3.8.1 | |
with: | |
node-version: "14" | |
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 #v1.152.0 | |
with: | |
bundler-cache: true | |
- name: Build middleman site | |
id: build | |
run: bundle exec middleman build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c | |
with: | |
path: 'build' | |
- name: Deploy to GitHub pages | |
id: deployment | |
uses: actions/deploy-pages@9dbe3824824f8a1377b8e298bafde1a50ede43e5 | |
- name: Slack notify on failure | |
if: failure() | |
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 | |
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 |