feat: add animated text #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: Build Documentation | |
on: | |
workflow_dispatch: | |
push: | |
permissions: | |
contents: write | |
jobs: | |
documentation: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Log Disk Space | |
run: df -h | |
- name: Free Disk Space | |
uses: jlumbroso/free-disk-space@main | |
with: | |
tool-cache: false | |
large-packages: false | |
swap-storage: false | |
- name: Install Dependencies | |
run: | | |
sudo apt install ffmpeg pngquant imagemagick libfuse2 | |
wget https://github.com/vgmstream/vgmstream-releases/releases/download/nightly/vgmstream-linux-cli.tar.gz | |
tar -zxf vgmstream-linux-cli.tar.gz | |
mkdir bin | |
mv vgmstream-cli bin | |
wget https://imagemagick.org/archive/binaries/magick | |
mv magick bin | |
chmod a+x bin/* | |
echo "${PWD}/bin" >> $GITHUB_PATH | |
- name: Restore Cached Resources | |
id: restore-gf-downloader-resources | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
unpack/downloader/output | |
key: gf-downloader-resources | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v3 | |
- name: Setup Python Environment | |
run: | | |
cd unpack | |
pdm install | |
source .venv/bin/activate | |
pip install -r downloader/requirements.txt | |
- name: Download Resources | |
run: | | |
cd unpack | |
source .venv/bin/activate | |
cd downloader | |
python downloader.py | |
- name: Cache Downloaded Resources | |
uses: actions/cache/save@v3 | |
with: | |
path: | | |
unpack/downloader/output | |
key: ${{ steps.restore-gf-downloader-resources.outputs.cache-primary-key }} | |
- name: Restore Cached Resources (audio) | |
id: restore-audio-resources | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
unpack/audio | |
key: gf-audio-resources | |
- name: Restore Cached Resources (images) | |
id: restore-image-resources | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
unpack/images | |
key: gf-image-resources | |
- name: Unpack resources | |
run: | | |
cd unpack | |
source .venv/bin/activate | |
python -m gfunpack downloader/output -o . | |
- name: Log Disk Space | |
run: df -h | |
- name: Cache Resources (audio) | |
uses: actions/cache/save@v3 | |
with: | |
path: | | |
unpack/audio | |
key: ${{ steps.restore-audio-resources.outputs.cache-primary-key }} | |
- name: Cache Resources (images) | |
uses: actions/cache/save@v3 | |
with: | |
path: | | |
unpack/images | |
key: ${{ steps.restore-image-resources.outputs.cache-primary-key }} | |
- name: Move Resources | |
run: | | |
cd unpack | |
cp audio/audio.json images/backgrounds.json images/characters.json stories/stories.json stories/chapters.json ../src/assets | |
mv audio ../public | |
mv images ../public | |
mv stories ../public | |
- name: Setup PNPM | |
uses: pnpm/[email protected] | |
with: | |
version: 8.5.0 | |
run_install: false | |
- name: Setup PNPM Workspace | |
run: | | |
pnpm install | |
- name: Build Site | |
run: | | |
pnpm build | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }} | |
directory: dist |