Auto reveal if possible, remove reveal button. #12
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: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: yarn install | |
- name: Build | |
run: yarn build-only | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |
notify-on-failure: | |
runs-on: ubuntu-latest | |
needs: [deploy] | |
if: failure() | |
steps: | |
- name: Notify failure | |
uses: "ravsamhq/[email protected]" | |
with: | |
status: failure | |
notification_title: "Deploy failed on ${{ github.ref_name }} - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Failure>" | |
message_format: ":fire: *Deploy Rock-paper-scissors site to Pages* in <${{ github.server_url }}/${{ github.repository }}/${{ github.ref_name }}|${{ github.repository }}>" | |
footer: "Linked Repo <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Failure>" | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.DEPLOY_FAIL_SLACK }} |