Reduce errors when updating actions and workflows and hopefully stop silent failures for things --- #### Does this PR need a docs update or release note? - [ ] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [x] ⛔ No #### Type of change - [ ] 🌻 Feature - [ ] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Supportability/Tests - [x] 💻 CI/Deployment - [ ] 🧹 Tech Debt/Cleanup #### Test Plan - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
name: Publish website
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
# required to retrieve AWS credentials
|
|
id-token: write
|
|
contents: write
|
|
packages: write
|
|
pull-requests: read
|
|
|
|
# cancel currently running jobs if a new version of the branch is pushed
|
|
concurrency:
|
|
group: push-website-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
SetEnv:
|
|
environment: Testing
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
version: ${{ steps.version.outputs.version }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0 # needed to get latest tag
|
|
|
|
- name: Get version string
|
|
id: version
|
|
run: |
|
|
echo version=$(git describe --tags --abbrev=0) | tee -a $GITHUB_OUTPUT
|
|
|
|
# ----------------------------------------------------------------------------------------------------
|
|
# --- Website Linting -----------------------------------------------------------------------------------
|
|
# ----------------------------------------------------------------------------------------------------
|
|
|
|
Website-Linting:
|
|
needs: [SetEnv]
|
|
environment: Testing
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Lint Website
|
|
uses: ./.github/actions/website-linting
|
|
with:
|
|
version: ${{ needs.SetEnv.outputs.version }}
|
|
|
|
Publish-Website:
|
|
needs: [Website-Linting]
|
|
environment: Production
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: website
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3 # need to checkout to make the action available
|
|
|
|
- name: Publish website
|
|
uses: ./.github/actions/publish-website
|
|
with:
|
|
aws-iam-role: ${{ secrets.AWS_IAM_ROLE }}
|
|
bucket: "corsobackup.io"
|
|
cfid: "E1W9NGI9YTVZ1A" |