Skip to content

Commit

Permalink
fix thing
Browse files Browse the repository at this point in the history
  • Loading branch information
truong9c2208 committed Jun 13, 2024
1 parent bc3bab0 commit fe29b4c
Show file tree
Hide file tree
Showing 2 changed files with 2,744 additions and 18 deletions.
87 changes: 69 additions & 18 deletions .github/workflows/something.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,81 @@
name: Publish to GitHub Pages
name: Autobuild

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

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
build:
permissions:
deployments: write
contents: read
pages: write
runs-on: ubuntu-latest

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

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 20.x

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '22'
- name: Compile frontend
run: pnpm run build
env:
CI: "false"

- name: Install dependencies
run: npm ci
- name: Fix permissions
run: |
chmod -c -R +rX "./dist" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Build project
run: npm run build
- name: Archive artifact
shell: sh

run: |
tar \
--dereference --hard-dereference \
--directory "$INPUT_PATH" \
-cvf "$RUNNER_TEMP/artifact.tar" \
--exclude=.git \
--exclude=.github \
.
env:
INPUT_PATH: dist/

- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
- name: Upload artifact
id: upload-artifact
uses: actions/upload-artifact@v4
with:
name: github-pages
path: ${{ runner.temp }}/artifact.tar
retention-days: 1
if-no-files-found: error

deploy:
needs: build
permissions:
pages: write
id-token: write

environment:
name: Profile
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Loading

0 comments on commit fe29b4c

Please sign in to comment.