Update routes.yml #6
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: Build pages for links | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Build link pages | |
run: python build.py | |
- name: Set up Git | |
run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "<>" | |
- name: Add to orphan work tree | |
run: | | |
git checkout --orphan gh-pages | |
git --work-tree dist add --all | |
git --work-tree dist commit -m "Build link pages" | |
- name: Push build | |
run: git push origin HEAD:gh-pages --force | |
- name: Clean up | |
run: | | |
rm -r dist | |
git checkout -f main | |
git branch -D gh-pages |