mirror of
https://github.com/Viren070/guides.git
synced 2025-12-01 23:16:16 +01:00
ci: revert
This commit is contained in:
+25
-13
@@ -3,7 +3,7 @@ name: Build and Deploy to GitHub Pages
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**" # Trigger on all branches
|
||||
- main
|
||||
# Review gh actions docs if you want to further define triggers, paths, etc
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
|
||||
|
||||
@@ -24,16 +24,28 @@ jobs:
|
||||
run: npm ci
|
||||
- name: Build website
|
||||
run: npm run build
|
||||
|
||||
- name: Create build directory
|
||||
run: mkdir -p ./build/${{ github.head_ref || github.ref_name }}
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
if: github.actor != 'dependabot[bot]'
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./build
|
||||
destination_dir: ${{ github.head_ref || github.ref_name }}
|
||||
allow_empty_commit: true
|
||||
|
||||
- name: Upload Build Artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: build
|
||||
|
||||
deploy:
|
||||
name: Deploy to GitHub Pages
|
||||
needs: build
|
||||
|
||||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
|
||||
permissions:
|
||||
pages: write # to deploy to Pages
|
||||
id-token: write # to verify the deployment originates from an appropriate source
|
||||
|
||||
# Deploy to the github-pages environment
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
Reference in New Issue
Block a user