diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 3013709..063ff1c 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,67 +1,67 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content 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 - - -# Configure these variables under your repo settings. -# You will likely need to set BASE_URL to be the name of your repo eg 'bentopdf' -env: - SIMPLE_MODE: ${{ vars.SIMPLE_MODE }} - BASE_URL: ${{ vars.BASE_URL }}/ - HUSKY: 0 - -jobs: - # Single deploy job since we're just deploying +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content 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 + + +# Configure these variables under your repo settings. +# You will likely need to set BASE_URL to be the name of your repo eg 'bentopdf' +env: + SIMPLE_MODE: ${{ vars.SIMPLE_MODE }} + BASE_URL: ${{ vars.BASE_URL }}/ + HUSKY: 0 + +jobs: + # Single deploy job since we're just deploying deploy: if: github.repository == 'alam00000/bentopdf' environment: name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "20" - - name: Install dependencies - run: npm ci - - name: Build distribution - run: | - # export SIMPLE_MODE=${{ vars.SIMPLE_MODE }} - # export BASE_URL=${{ vars.BASE_URL }}/ - npm run build - - - name: Setup Pages - uses: actions/configure-pages@v5 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload entire repository - path: dist - name: github-pages-deployment - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 - with: - artifact_name: github-pages-deployment + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + - name: Install dependencies + run: npm ci + - name: Build distribution + run: | + # export SIMPLE_MODE=${{ vars.SIMPLE_MODE }} + # export BASE_URL=${{ vars.BASE_URL }}/ + npm run build + + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: dist + name: github-pages-deployment + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + with: + artifact_name: github-pages-deployment