Merge pull request #2492 from 2dos/dev #50
This file contains hidden or 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: Release to Github Pages Prod | |
| on: | |
| push: | |
| branches: [ master ] | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup python | |
| uses: actions/setup-python@v4.1.0 | |
| with: | |
| python-version: 3.10.9 | |
| architecture: x64 | |
| - name: Install packages | |
| run: | | |
| pip install -r requirements-dev.txt | |
| pip install wheel setuptools | |
| - name: NPM install | |
| run: | | |
| npm install | |
| node_modules/nunjucks/bin/precompile templates/ > ./static/js/compile_templates.js | |
| rm -rf ./node_modules | |
| - name: Build minified versions | |
| run: python3 ./tools/prepare_live.py | |
| - name: Remove Git Ignore (This might be changed in the future) | |
| run: rm .gitignore | |
| - name: Move Files | |
| run: mkdir ./deploy-directory && mv -f ./* ./deploy-directory/ || true | |
| - name: Pre Write Files | |
| run: echo 'This repo is for Github Pages for DK64Rando, you need to go to https://github.com/2dos/DK64-Randomizer' > ./deploy-directory/README.md && echo 'dk64randomizer.com' > ./deploy-directory/CNAME && touch ./deploy-directory/.nojekyll | |
| - name: Deploy to Github Pages | |
| uses: hpcodecraft/action-deploy-workspace-to-repo@v2.2 | |
| env: | |
| GITHUB_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
| SRC_FOLDER: ./deploy-directory | |
| DEST_OWNER: 2dos | |
| DEST_REPO: DK64-Randomizer-Release | |
| DEST_BRANCH: main | |
| DEST_FOLDER: ./ | |
| DEST_PREDEPLOY_CLEANUP: rm -rf ./* | |