Skip to content

Commit

Permalink
chore: Update Github Page workflow and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cvyl committed Aug 11, 2024
1 parent 2df3e68 commit bea96b9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 63 deletions.
64 changes: 22 additions & 42 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,32 @@
# File: .github/workflows/publish.yml
name: publish-to-github-pages
name: Github Page

on:
push:
branches:
- main

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

concurrency:
group: "pages"
cancel-in-progress: false
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧
uses: ./.github/workflows/setup-node

- name: Setup Pages ⚙️
uses: actions/configure-pages@v4
- name: Checkout
uses: actions/checkout@v3
- name: Install Packages
uses: pnpm/action-setup@v2
with:
static_site_generator: next

- name: Build with Next.js 🏗️
run: npx next build

- name: Upload artifact 📡
uses: actions/upload-pages-artifact@v3
version: 8
run_install: true
- name: Set Environment Variables
env:
BASE_PATH: /react-texteditor-example
run: |
echo "" > .env.local
echo BASE_PATH=$BASE_PATH >> .env.local
- name: Build
run: pnpm run build
- name: Create .nojekyll
run: touch ./out/.nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
path: ./out

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
needs: build

steps:
- name: Publish to GitHub Pages 🚀
id: deployment
uses: actions/deploy-pages@v4
folder: out
21 changes: 0 additions & 21 deletions .github/workflows/setup-node/action.yml

This file was deleted.

0 comments on commit bea96b9

Please sign in to comment.