fix(pages): do not zip gh-pages parent directory #1206
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: Update | |
on: | |
pull_request: | |
branches: | |
- master | |
types: | |
- opened | |
- synchronize | |
- reopened | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 0 * * *' # every day at midnight | |
workflow_dispatch: | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: cache | |
key: update-${{ github.sha }} | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
- name: Update | |
env: | |
TWITCH_CLIENT_ID: ${{ secrets.TWITCH_CLIENT_ID }} | |
TWITCH_CLIENT_SECRET: ${{ secrets.TWITCH_CLIENT_SECRET }} | |
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }} | |
run: python -u src/update_db.py ${{ github.event_name == 'pull_request' && '-t' || '' }} | |
- name: Prepare Artifacts # uploading artifacts will fail if not zipped due to very large quantity of files | |
shell: bash | |
run: | | |
7z a build.zip ./gh-pages/* | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: update | |
path: | | |
${{ github.workspace }}/build.zip | |
gh-pages-template/ | |
if-no-files-found: error | |
include-hidden-files: true | |
retention-days: 1 | |
call-jekyll-build: | |
needs: update | |
uses: LizardByte/LizardByte.github.io/.github/workflows/jekyll-build.yml@master | |
with: | |
site_artifact: 'update' | |
extract_archive: 'build.zip' | |
target_branch: 'gh-pages' | |
clean_gh_pages: true | |
secrets: | |
GH_BOT_EMAIL: ${{ secrets.GH_BOT_EMAIL }} | |
GH_BOT_NAME: ${{ secrets.GH_BOT_NAME }} | |
GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }} |