-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update Github Page workflow and dependencies
- Loading branch information
Showing
2 changed files
with
22 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.