[experiences] Add Secure Agility #62
Workflow file for this run
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: GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- '**' | |
workflow_dispatch: | |
branches: | |
- '**' | |
jobs: | |
build: | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- run: make install | |
- run: make gh-pages/tarball | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts.tar.bz2 | |
path: artifacts.tar.bz2 | |
runs-on: ubuntu-latest | |
lint: | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- run: | | |
sudo -H apt-get update && \ | |
sudo -H apt-get install --yes libxml2-utils | |
- run: find . -type f -name '*.xml' | xargs xmllint --noout | |
runs-on: ubuntu-latest | |
deploy: | |
needs: | |
- build | |
- lint | |
if: | | |
github.ref == 'refs/heads/master' && github.event_name != 'pull_request' | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: artifacts.tar.bz2 | |
- run: tar --extract --bzip2 --verbose --file=artifacts.tar.bz2 | |
- run: | | |
mkdir --parent /tmp/deploy | |
rsync --delete --links --recursive --verbose gh-pages/ /tmp/deploy | |
- run: | | |
git init | |
git checkout --orphan gh-pages | |
git config user.email "[email protected]" | |
git config user.name "Ashen Gunaratne" | |
git add --all --force . | |
git commit --quiet --message "Deploy ashenm/xmlresume to github.com/${GITHUB_REPOSITORY}.git:gh-pages" | |
git push --force --quiet "https://${{ secrets.OCTOCAT_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" "gh-pages:gh-pages" | |
git show --stat-count=10 HEAD | |
working-directory: /tmp/deploy | |
runs-on: ubuntu-latest | |
culminate: | |
needs: | |
- deploy | |
steps: | |
- run: | | |
# ashenm/homepage | |
curl --fail --request POST --header "Accept: application/vnd.github.v3+json" --header "Authorization: token ${OCTOCAT_TOKEN}" --data "{ \"ref\": \"master\" }" --url "https://api.github.com/repos/ashenm/homepage/actions/workflows/pages.yml/dispatches" | |
env: | |
OCTOCAT_TOKEN: ${{ secrets.OCTOCAT_TOKEN }} | |
runs-on: ubuntu-latest | |
# vim: set expandtab shiftwidth=2: |