diff --git a/.github/workflows/main-build.yaml b/.github/workflows/main-build.yaml index 0c1bfd0..51f53df 100644 --- a/.github/workflows/main-build.yaml +++ b/.github/workflows/main-build.yaml @@ -10,12 +10,13 @@ jobs: deploy: name: Deploy to GitHub Pages runs-on: ubuntu-latest + environment: github-pages permissions: contents: write env: - APPLICATION_ID: ${{secrets.APPLICATION_ID}} - API_KEY: ${{secrets.API_KEY}} - INDEX_NAME: ${{secrets.INDEX_NAME}} + APPLICATION_ID: ${{ secrets.APPLICATION_ID }} + API_KEY: ${{ secrets.API_KEY }} + INDEX_NAME: ${{ secrets.INDEX_NAME }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -29,9 +30,9 @@ jobs: - name: Create .env file uses: ozaytsev86/create-env-file@v1 with: - ENV_APPLICATION_ID: ${{secrets.APPLICATION_ID}} - ENV_API_KEY: ${{secrets.API_KEY}} - ENV_INDEX_NAME: ${{secrets.INDEX_NAME}} + ENV_APPLICATION_ID: ${{ secrets.APPLICATION_ID }} + ENV_API_KEY: ${{ secrets.API_KEY }} + ENV_INDEX_NAME: ${{ secrets.INDEX_NAME }} - name: Build website run: npm run build @@ -43,7 +44,7 @@ jobs: - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: - github_token: ${{secrets.GITHUB_TOKEN}} + github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build user_name: liuyuweitarek user_email: liuyuwei.tarek@gmail.com @@ -55,7 +56,7 @@ jobs: - name: Push indices to Algolia uses: signcl/docsearch-scraper-action@master env: - INDEX_NAME: ${{secrets.INDEX_NAME}} - APPLICATION_ID: ${{secrets.APPLICATION_ID}} - API_KEY: ${{secrets.API_KEY}} + INDEX_NAME: ${{ secrets.INDEX_NAME }} + APPLICATION_ID: ${{ secrets.APPLICATION_ID }} + API_KEY: ${{ secrets.API_KEY }} CONFIG: ${{ steps.algolia_config.outputs.config }} \ No newline at end of file