github: deploy: Gzip manifest #1275
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: Consolidate and Deploy | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 10 */1 * *" # At 10:00 UTC on every day-of-month | |
permissions: | |
contents: write | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- name: Install python 🐍 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install | |
run: | | |
sudo apt install -y yarn | |
python -m pip install --editable . | |
rm -rf blueos_extensions_repository.egg-info | |
mkdir build | |
- name: Build manifest | |
run: | | |
python blueos_repository/consolidate.py | |
mv manifest.json build/ | |
mv manifest.log build/ | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build website | |
run: | | |
cd website | |
yarn install --frozen-lockfile | |
yarn build | |
gzip build/manifest.json --best --keep | |
mv dist/* ../build | |
- name: Upload logs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: generation-logs | |
path: manifest.log | |
- name: Upload manifest | |
uses: actions/upload-artifact@v4 | |
with: | |
name: manifest.json | |
path: build/manifest.json | |
- name: Upload manifest gzip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: manifest.json.gzip | |
path: build/manifest.json.gzip | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: build # The folder the action should deploy. | |
# source: https://github.com/actions/checkout/pull/1184/files | |
git-config-email: '41898282+github-actions[bot]@users.noreply.github.com' | |
git-config-name: 'github-actions[bot]' | |
if: github.event_name != 'pull_request' |