forked from mazipan/baca-quran.id
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from mazipan/master
[pull] master from mazipan:master
- Loading branch information
Showing
1 changed file
with
68 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 |