Skip to content

Commit

Permalink
git hub pages actions
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoLuglio committed Sep 23, 2024
1 parent aeaa11f commit 713bfb1
Showing 1 changed file with 32 additions and 21 deletions.
53 changes: 32 additions & 21 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,49 @@ name: Deploy to GitHub Pages

on:
push:
branches:
- main
branches: ["main"]

workflow_dispatch:

# New: Add permissions for the GITHUB_TOKEN
permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v2
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
node-version: '16'

- name: Install Bun
run: |
curl -fsSL https://bun.sh/install | bash
echo 'export BUN_INSTALL="$HOME/.bun"' >> $GITHUB_ENV
echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> $GITHUB_ENV
source $GITHUB_ENV
bun --version
bun-version: latest

- name: Install dependencies
run: bun install

- name: Build project
- name: Build
run: bun run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
path: ./out

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 713bfb1

Please sign in to comment.