Skip to content

Merge branch 'dev' of https://github.com/ba-archive/blue-archive into… #55

Merge branch 'dev' of https://github.com/ba-archive/blue-archive into…

Merge branch 'dev' of https://github.com/ba-archive/blue-archive into… #55

# Simple workflow for deploying static content to GitHub Pages
name: Deploy Website To GitHub Pages
on:
# Runs on pushes targeting the default branch
push:
branches:
- master
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: https://ba-archive.github.io/blue-archive/
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
with:
version: latest
- name: Verify Change Logs
run: node common/scripts/install-run-rush.js change --verify
- name: Rush Update
run: node common/scripts/install-run-rush.js update
- name: Rush Install
run: node common/scripts/install-run-rush.js install
- name: Generate secret for translator
env:
YOUDAO_APP_ID: ${{ secrets.YOUDAO_APP_ID }}
YOUDAO_APP_SECRET: ${{ secrets.YOUDAO_APP_SECRET }}
shell: python
run: |
import os
YOUDAO_APP_ID = os.getenv("YOUDAO_APP_ID")
YOUDAO_APP_SECRET = os.getenv("YOUDAO_APP_SECRET")
with open("./apps/ba-online-toolbox/src/tools/public/secrets.json", "w") as f:
f.write(f'{{"appKey": "{YOUDAO_APP_ID}", "appSecret": "{YOUDAO_APP_SECRET}"}}')
- name: Rush build
run: node common/scripts/install-run-rush.js build:github --to blue-archive-story-viewer --verbose
- name: Setup Pages
uses: actions/configure-pages@main
- name: Upload artifact
uses: actions/upload-pages-artifact@main
with:
# Upload dist repository
path: "./apps/blue-archive-story-viewer/dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@main