Fix lang default zh ln to zh_TW path error #109
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: sync | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- server/** | |
- README.md | |
- .github/** | |
- '!.github/workflows/**' | |
schedule: | |
- cron: '0 0 * * *' | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: pip | |
- name: Install dependencies | |
run: pip install -r scripts/requirements.txt | |
- name: Copy Static Data | |
run: | | |
mkdir output | |
cp -r data/* output | |
cp -r assets/* output | |
ln -s output/zh_TW output/zh | |
- name: Sync | |
run: python scripts/summon.py | |
env: | |
BASE_API_URL: ${{ secrets.BASE_API_URL }} | |
# - name: deploy | |
# run: | | |
# cd output | |
# [ -f 404.html ] || ln -s index.html 404.html | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
# Upload entire repository | |
path: './output' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |