diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 13acb96..dbf6914 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,31 +1,19 @@ -# Simple workflow for deploying static content to GitHub Pages name: Deploy to GitHub Pages on: - # Runs on pushes targeting the default branch push: branches: ["master"] - - # 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 - pages: write - id-token: write + contents: write -# Allow only one concurrent deployment concurrency: group: "pages" cancel-in-progress: true jobs: - # Single deploy job since we're just deploying deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - name: Checkout @@ -39,12 +27,9 @@ jobs: run: npm install - name: Build run: npm run build - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: './dist' - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist + keep_files: true diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000..6fe553d --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,26 @@ +name: PR Preview + +on: + pull_request: + types: [opened, synchronize, reopened, closed] + +concurrency: preview-${{ github.ref }} + +permissions: + contents: write + pull-requests: write + +jobs: + preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: "npm" + - run: npm install + - run: npm run build + - uses: rossjrw/pr-preview-action@v1 + with: + source-dir: ./dist/ diff --git a/en/index.html b/en/index.html index 8126822..10f1c41 100644 --- a/en/index.html +++ b/en/index.html @@ -3,7 +3,7 @@
- +