diff --git a/.github/workflows/site.yaml b/.github/workflows/site.yaml index e9ca82a1e..b00038e68 100644 --- a/.github/workflows/site.yaml +++ b/.github/workflows/site.yaml @@ -41,46 +41,4 @@ jobs: run: npm run lint - name: ๐Ÿ‘ท Build website - run: npm run build - - deploy: - needs: build - - runs-on: ubuntu-latest - - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - - defaults: - run: - working-directory: site - - steps: - - name: ๐Ÿ“š Git Checkout - uses: actions/checkout@v5 - - - name: โš™๏ธ Setup Node - uses: actions/setup-node@v5 - with: - node-version: 18.x - cache: npm - cache-dependency-path: site/package-lock.json - - - name: ๐Ÿ“ฆ Install Dependencies - run: npm ci - - - name: โœจ Check Format - run: npm run format:check - - - name: ๐Ÿงน Lint - run: npm run lint - - - name: ๐Ÿ‘ท Build website - run: npm run build - - - name: โ˜๏ธ Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./site/build - user_name: github-actions[bot] - user_email: 41898282+github-actions[bot]@users.noreply.github.com + run: npm run build \ No newline at end of file diff --git a/.github/workflows/site_deploy.yaml b/.github/workflows/site_deploy.yaml new file mode 100644 index 000000000..87f53538a --- /dev/null +++ b/.github/workflows/site_deploy.yaml @@ -0,0 +1,46 @@ +name: site_deploy + +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+*" + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: site + + steps: + - name: ๐Ÿ“š Git Checkout + uses: actions/checkout@v5 + + - name: โš™๏ธ Setup Node + uses: actions/setup-node@v5 + with: + node-version: 18.x + cache: npm + cache-dependency-path: site/package-lock.json + + - name: ๐Ÿ“ฆ Install Dependencies + run: npm ci + + - name: โœจ Check Format + run: npm run format:check + + - name: ๐Ÿงน Lint + run: npm run lint + + - name: ๐Ÿ‘ท Build website + run: npm run build + + - name: โ˜๏ธ Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./site/build + user_name: github-actions[bot] + user_email: 41898282+github-actions[bot]@users.noreply.github.com