Skip to content

Commit

Permalink
gh deploy setup
Browse files Browse the repository at this point in the history
  • Loading branch information
neila committed Jun 14, 2024
1 parent d4f7075 commit e6253f8
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 2 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Build docusaurus
run: yarn build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: build

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

concurrency:
group: "pages"
cancel-in-progress: false
26 changes: 26 additions & 0 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test deployment

on:
pull_request:
branches:
- main

jobs:
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn

- name: Install dependencies
run: yarn install --immutable
- name: Test build website
run: yarn build

concurrency:
group: "pages"
cancel-in-progress: true
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"repository": "https://github.com/unchain-dev/UNCHAIN-projects.git",
"author": "SHØ <[email protected]> (https://akxra.art/)",
"scripts": {
"textlint:check": "textlint docs/*/ja/**/*.md --ignore-path .textlintignore",
"textlint:fix": "textlint --fix docs/*/ja/**/*.md --ignore-path .textlintignore",
"textlint:check": "textlint docs/**/*.md --ignore-path .textlintignore",
"textlint:fix": "textlint --fix docs/**/*.md --ignore-path .textlintignore",
"prepare": "simple-git-hooks",
"docusaurus": "docusaurus",
"start": "docusaurus start",
Expand Down
Empty file added public/.nojekyll
Empty file.

0 comments on commit e6253f8

Please sign in to comment.