corso/.github/workflows/website-publish.yml
Keepers 1752d1117f
fix up mergequeue and ci (#21)
* fix up mergequeue and ci

* rename ci job

* spacing out triggers?

* fix ci script

* fixing up test runner
2024-02-08 21:37:59 +00:00

74 lines
2.0 KiB
YAML

name: Publish website
on:
# workflow_dispatch:
# turned off for now, since canario should not publish the website
push:
branches:
does-not-exist-this-forces-the-action-to-not-run
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@v4
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@v4
- name: Lint Website
uses: ./.github/actions/website-linting
with:
version: ${{ needs.SetEnv.outputs.version }}
Publish-Website:
needs: [Website-Linting]
# canario should never publish
if: false
environment: Production
runs-on: ubuntu-latest
defaults:
run:
working-directory: website
steps:
- uses: actions/checkout@v4 # need to checkout to make the action available
- name: Publish website
# canario should never publish
if: false
uses: ./.github/actions/publish-website
with:
aws-iam-role: ${{ secrets.AWS_IAM_ROLE }}
bucket: "corsobackup.io"
cfid: "E1W9NGI9YTVZ1A"