From bc77fe97953dd569da49285015b71e77d7592068 Mon Sep 17 00:00:00 2001 From: djohnson Date: Sun, 14 Apr 2024 12:43:18 +0900 Subject: [PATCH] CI-CD: action should use yarn instead of npm --- .github/workflows/deploy_to_gh_pages.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy_to_gh_pages.yml b/.github/workflows/deploy_to_gh_pages.yml index 44a7c6c..e896d42 100644 --- a/.github/workflows/deploy_to_gh_pages.yml +++ b/.github/workflows/deploy_to_gh_pages.yml @@ -6,9 +6,6 @@ on: push: branches: ['main'] - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - # Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages permissions: contents: read @@ -30,22 +27,27 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Set up Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18 - cache: 'npm' - - name: Install dependencies - run: npm install - - name: Build - run: npm run build + node-version: 21 + + - name: Run yarn install + run: yarn + + - name: Run yarn build + run: yarn build + - name: Setup Pages uses: actions/configure-pages@v3 + - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: # Upload dist repository path: './dist' + - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v2