on-millennium-sdk-updated #61
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: Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| repository_dispatch: | |
| types: [on-millennium-sdk-updated] | |
| permissions: | |
| checks: write | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| build_and_deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: '20' | |
| - name: Install pnpm | |
| run: npm install -g pnpm | |
| - name: Generate Auto Documentation | |
| run: | | |
| git clone https://github.com/SteamClientHomebrew/SDK | |
| cd SDK | |
| pnpm install | |
| pnpm run docs | |
| cp -r ./docs/* ../docs/ui/developers/plugins/typescript/ | |
| ls -la ../docs/ui/developers/ | |
| - name: Install dependencies and build | |
| run: | | |
| cd www | |
| pnpm install | |
| cd ../docs | |
| pnpm install | |
| - name: Install Firebase Tools | |
| run: | | |
| npm install -g firebase-tools | |
| firebase experiments:enable webframeworks | |
| - name: Set up Google Application Credentials | |
| run: | | |
| mkdir -p ./api/credentials | |
| echo "$FIREBASE_CREDENTIALS" | base64 -d > ./www/firebase.credentials.json | |
| env: | |
| FIREBASE_CREDENTIALS: ${{ secrets.FIREBASE_CREDENTIALS }} | |
| - name: Setup Environment Variables | |
| run: | | |
| mkdir -p ./api | |
| echo "$BEARER" > ./www/.env | |
| env: | |
| BEARER: ${{ secrets.BEARER }} | |
| - name: Deploy Documentation | |
| env: | |
| FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
| run: | | |
| cd docs | |
| pnpm run build | |
| firebase deploy --only hosting --token $FIREBASE_TOKEN --force | |
| - name: Deploy Main Site | |
| env: | |
| FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
| run: | | |
| cd www | |
| pnpm run build | |
| firebase deploy --only hosting --token $FIREBASE_TOKEN --force |