-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (51 loc) · 1.36 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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