Advertisement
LukeSavefrogs

Untitled

Apr 16th, 2024
616
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.16 KB | None | 0 0
  1. name: Deploy to GitHub Pages
  2.  
  3. on:
  4.  # Trigger the workflow every time you push to the `main` branch
  5.   # Using a different branch name? Replace `main` with your branch’s name
  6.   push:
  7.     branches: [main]
  8.   # Allows you to run this workflow manually from the Actions tab on GitHub.
  9.   workflow_dispatch:
  10. # Allow this job to clone the repo and create a page deployment
  11. permissions:
  12.   contents: read
  13.   pages: write
  14.   id-token: write
  15.  
  16. # Allow one concurrent deployment
  17. concurrency:
  18.   group: "pages"
  19.   cancel-in-progress: true
  20.  
  21. jobs:
  22.   build:
  23.     runs-on: ubuntu-latest
  24.     steps:
  25.       - name: Checkout your repository using git
  26.         uses: actions/checkout@v4
  27.        
  28.       - name: Install dependencies
  29.         run: npm install
  30.  
  31.       - name: Info
  32.         run: npm run astro info
  33.        
  34.       - name: Install, build, and upload your site output
  35.         uses: withastro/action@v2
  36.  
  37.   deploy:
  38.     needs: build
  39.     runs-on: ubuntu-latest
  40.     environment:
  41.       name: github-pages
  42.       url: ${{ steps.deployment.outputs.page_url }}
  43.     steps:
  44.       - name: Deploy to GitHub Pages
  45.         id: deployment
  46.         uses: actions/deploy-pages@v4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement