Merge pull request #12 from stackpan/cintai-aku #40
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: | |
workflow_dispatch: | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Setup venv | |
run: python -m venv venv | |
- name: Setup PyYAML | |
run: venv/bin/pip install pyyaml | |
- name: Generate Copypasta JSON | |
run: venv/bin/python generate_copypasta.py | |
- name: Copy Needed Files | |
run: | | |
set -e | |
mkdir _site | |
cp index.html _site/index.html | |
cp copypasta.json _site/copypasta.json | |
- name: GitHub Pages Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
retention-days: 90 | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name == 'push' | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deploy.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deploy | |
uses: actions/deploy-pages@v4 |