Skip to content

Commit

Permalink
update deploy.yml file as suggested by github help
Browse files Browse the repository at this point in the history
  • Loading branch information
joelbyrd committed Dec 10, 2024
1 parent d38e63a commit bd5c296
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 14 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy--OLD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy GitHub Pages

on:
push:
branches:
- main # Change to your default branch if it's not "main"

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build

- name: List build output
run: |
ls -la dist/
cat dist/index.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.ACCESS_TOKEN }} # Use the PAT here
publish_dir: ./dist
#uses: JamesIves/github-pages-deploy-action@v4
#with:
#branch: gh-pages # The branch to deploy to
#folder: dist # The folder to deploy
#token: ${{ secrets.ACCESS_TOKEN }} # Use your personal access token here
37 changes: 23 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,43 @@ name: Deploy GitHub Pages
on:
push:
branches:
- main # Change to your default branch if it's not "main"
- main

permissions:
contents: read
pages: write
id-token: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build

- name: List build output
run: |
ls -la dist/
cat dist/index.html
- name: Setup Pages
uses: actions/configure-pages@v3

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
personal_token: ${{ secrets.ACCESS_TOKEN }} # Use the PAT here
publish_dir: ./dist
#uses: JamesIves/github-pages-deploy-action@v4
#with:
#branch: gh-pages # The branch to deploy to
#folder: dist # The folder to deploy
#token: ${{ secrets.ACCESS_TOKEN }} # Use your personal access token here
path: "./dist"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit bd5c296

Please sign in to comment.