This repository contains the slides and demos for the session "From Code to Cloud: Automated Deployments with GitHub Actions".
WEBSITE_URL:https://estruyf.github.io/presentation-github-actions/WEBSITE_URL:https://github-actions.elio.dev
- Preview:
https://ambitious-mud-08855ab03-preview.westeurope.5.azurestaticapps.net/ - Production:
https://ambitious-mud-08855ab03.5.azurestaticapps.net/|https://github-actions.elio.dev
- Create a new repository
- Clone this project
- Add the initial files to your repository
- Create two environments in your repository
previewproduction
- Add the
AZURE_STATIC_WEB_APPS_API_TOKENsecret to the preview & production environment - In the pages setting, set the source to
GitHub Actionsinstead of a branch - Ready to start
Remove all workflow runs:
repo=$(gh repo view --json nameWithOwner | jq -r .nameWithOwner)
gh api repos/$repo/actions/runs --paginate | jq -r -c '.workflow_runs[] | "\(.id)"' | \
xargs -n1 -I % gh api repos/$repo/actions/runs/% -X DELETE | jq -r .statusReset the waiting HTML on the site
rm -rf ./dist
mkdir ./dist
cp ./public/waiting.html ./dist/index.html
swa deploy ./dist --deployment-token <token> --env production