feat: dynamically generate app navigation from content frontmatter #3
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 one-platform to /one-platform on main | |
| on: | |
| push: | |
| branches: ["one-platform"] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout one-platform | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: one-platform | |
| path: one | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: one/package-lock.json | |
| - name: Install deps | |
| working-directory: one | |
| env: | |
| ASSET_PASSWORD: ${{ secrets.ASSET_PASSWORD }} | |
| ASSET_INIT_VECTOR: ${{ secrets.ASSET_INIT_VECTOR }} | |
| run: npm ci | |
| - name: Build | |
| working-directory: one | |
| run: npm run build | |
| - name: Checkout main | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| path: main | |
| - name: Copy build into main/one-platform and push | |
| run: | | |
| rm -rf main/one-platform/* | |
| mkdir -p main/one-platform | |
| cp -R one/public/* main/one-platform/ | |
| cd main | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add one-platform | |
| git commit -m "deploy(one-platform): $(date -u +%Y-%m-%dT%H:%M:%SZ)" || echo "No changes to commit" | |
| git push |