Deploy Astro site to Pages #478
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
| # To get started with Astro see: https://docs.astro.build/en/getting-started | |
| name: Deploy Astro site to Pages | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout your repository using git | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: "10" | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| cache: pnpm | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Cache Astro dist | |
| uses: actions/cache@v4 | |
| with: | |
| path: dist | |
| key: astro-${{ runner.os }}-${{ hashFiles('src/**', 'public/**', 'astro.config.*') }} | |
| - name: Install dependencies | |
| run: pnpm install --prefer-offline --frozen-lockfile | |
| - name: Build with Astro | |
| run: node ./src/utils/getReleases.mjs && pnpm build | |
| env: | |
| GITHUB_PERSONAL_ACCESS_TOKEN_ADDON: ${{ secrets.TABMIXPLUS_GITHUB_TOKEN }} | |
| GIST_ID: ${{ secrets.GIST_ID }} | |
| GIST_FILENAME: ${{ secrets.GIST_FILENAME }} | |
| PUBLIC_GOOGLE_FORM_URL: ${{ secrets.PUBLIC_GOOGLE_FORM_URL }} | |
| PUBLIC_GOOGLE_FORM_VERSION_ENTRY: ${{ secrets.PUBLIC_GOOGLE_FORM_VERSION_ENTRY }} | |
| PUBLIC_GOOGLE_FORM_OS_ENTRY: ${{ secrets.PUBLIC_GOOGLE_FORM_OS_ENTRY }} | |
| PUBLIC_GOOGLE_FORM_BROWSER_ENTRY: ${{ secrets.PUBLIC_GOOGLE_FORM_BROWSER_ENTRY }} | |
| PUBLIC_GOOGLE_FORM_BROWSER_VERSION_ENTRY: ${{ secrets.PUBLIC_GOOGLE_FORM_BROWSER_VERSION_ENTRY }} | |
| PUBLIC_GOOGLE_FORM_BROWSER_VERSION_D_ENTRY: ${{ secrets.PUBLIC_GOOGLE_FORM_BROWSER_VERSION_D_ENTRY }} | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: dist | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| permissions: | |
| pages: write | |
| id-token: write | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |