diff --git a/.github/workflows/nuxtjs.yml b/.github/workflows/nuxtjs.yml index 5573f1ef..fc280ee4 100644 --- a/.github/workflows/nuxtjs.yml +++ b/.github/workflows/nuxtjs.yml @@ -1,30 +1,20 @@ -# 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 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 one concurrent deployment concurrency: group: "pages" cancel-in-progress: true jobs: - # Build job build: runs-on: ubuntu-latest steps: @@ -68,12 +58,13 @@ jobs: env: GTAG_ID: ${{ vars.GTAG_ID }} - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: + name: github-pages path: ./dist - # Deployment job deploy: + name: Publish to GitHub Pages environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} @@ -82,4 +73,29 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v4 + + deploy-cloudflare: + name: Publish to Cloudflare Pages + environment: + name: cloudflare-pages + url: ${{ steps.deployment.outputs.url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: github-pages + path: ./dist + - name: Debug + run: ls -la + - name: Publish to Cloudflare Pages + id: deployment + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ vars.CLOUDFLARE_ID }} + projectName: retejs + directory: ./dist + gitHubToken: ${{ secrets.GITHUB_TOKEN }}