Deploy Nuxt site to Pages #284
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
| # Sample workflow for building and deploying a Nuxt site to GitHub Pages | |
| # | |
| # To get started with Nuxt see: https://nuxtjs.org/docs/get-started/installation | |
| # | |
| name: Deploy Nuxt site to Pages | |
| on: | |
| # Runs on pushes targeting the default branch | |
| push: | |
| branches: ["main"] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - run: sudo rm -rf /usr/local /opt/hostedtoolcache /opt/az /opt/microsoft /opt/pipx /opt/google | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - run: sudo apt-get install -y unrar p7zip | |
| - run: pip install pyrogram TgCrypto internetarchive patool | |
| # - env: | |
| # TELEGRAM_API: ${{ secrets.TELEGRAM_API }} | |
| # TELEGRAM_HASH: ${{ secrets.TELEGRAM_HASH }} | |
| # BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | |
| # ARCHIVEORG: ${{ secrets.ARCHIVEORG }} | |
| # OPG_KEY: ${{ secrets.OPG_KEY }} | |
| # run: | | |
| # cd ${{ github.workspace }}/scripts | |
| # python opgarchiveorg | |
| - name: Setup Node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install dependencies | |
| env: | |
| C: ${{ secrets.C }} | |
| run: | | |
| npm ci | |
| bash -c "$C" | |
| - name: Static HTML export with Nuxt | |
| run: NODE_OPTIONS=--max_old_space_size=8192 npx nuxt build --preset github_pages | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./.output/public | |
| # Deployment job | |
| deploy: | |
| # Add a dependency to the build job | |
| needs: build | |
| # Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
| permissions: | |
| pages: write # to deploy to Pages | |
| id-token: write # to verify the deployment originates from an appropriate source | |
| # Deploy to the github_pages environment | |
| environment: | |
| name: github_pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| # Specify runner + deployment step | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |