Skip to content

Commit

Permalink
Merge pull request #80 from mazipan/master
Browse files Browse the repository at this point in the history
[pull] master from mazipan:master
  • Loading branch information
mazipan authored Feb 20, 2024
2 parents 12b170e + 18c2015 commit 7a75316
Showing 1 changed file with 68 additions and 37 deletions.
105 changes: 68 additions & 37 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,22 @@ on:
jobs:
build_site:
runs-on: ubuntu-latest

permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
token: ${{ secrets.PERSONAL_TOKEN }}

- name: Install Node.js
uses: actions/setup-node@v3
Expand Down Expand Up @@ -54,42 +67,60 @@ jobs:
pnpm run build
touch build/.nojekyll
- name: Commit generated files only
# - name: Commit generated files only
# run: |
# echo "> Start remove unused files..."
# rm -rf markdowns
# rm -rf .github/workflows
# rm -rf .svelte-kit
# rm -rf screenshoot
# rm -rf scripts
# rm -rf static
# rm -rf src
# rm -rf node_modules
# rm .all-contributorsrc
# rm .editorconfig
# rm .eslintignore
# rm .eslintrc.cjs
# rm .gitignore
# rm .kodiak.toml
# rm .npmrc
# rm .prettierignore
# rm .prettierrc
# rm package.json
# rm pnpm-lock.yaml
# rm postcss.config.js
# rm svelte.config.js
# rm tailwind.config.js
# rm tsconfig.json
# rm vite.config.ts
# cp -r build/. ./
# rm -rf build
# git config --local user.email "[email protected]"
# git config --local user.name "Irfan Maulana"
# git add -A
# git commit -m "[CI]: Auto Deploy 🚀"
# echo "> Finish commit changes to repo"

- name: Fix permissions
run: |
echo "> Start remove unused files..."
rm -rf markdownds
rm -rf .github/workflows
rm -rf screenshoot
rm -rf scripts
rm -rf static
rm -rf src
rm .all-contributorsrc
rm .editorconfig
rm .eslintignore
rm .eslintrc.cjs
rm .gitignore
rm .kodiak.toml
rm .npmrc
rm .prettierignore
rm .prettierrc
rm package.json
rm pnpm-lock.yaml
rm postcss.config.js
rm svelte.config.js
rm tailwind.config.js
rm tsconfig.json
rm vite.config.ts
cp -r build/. ./
rm -rf build
git config --local user.email "[email protected]"
git config --local user.name "Irfan Maulana"
git add -A
git commit -m "[CI]: Auto Deploy 🚀"
echo "> Finish commit changes to repo"
- name: GitHub Push
uses: ad-m/[email protected]
chmod -c -R +rX "_site/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.PERSONAL_TOKEN }}
force: true
repository: mazipan-quran-offline/mazipan-quran-offline.github.io
path: build
name: pages

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action

# - name: GitHub Push
# uses: ad-m/[email protected]
# with:
# github_token: ${{ secrets.PERSONAL_TOKEN }}
# force: true
# repository: mazipan-quran-offline/mazipan-quran-offline.github.io

0 comments on commit 7a75316

Please sign in to comment.