Merge pull request #21 from kenny516/dev #22
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
name: Deploy Portfolio | |
on: | |
push: | |
branches: [ "main" ] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Prepare deployment | |
run: | | |
echo "Cleaning _site directory" | |
rm -rf ./_site | |
mkdir -p ./_site | |
echo "Copying src content to _site" | |
cp -r src/* ./_site/ | |
echo "Files in _site:" | |
ls -R ./_site | |
- name: Disable Jekyll | |
run: touch ./_site/.nojekyll | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: '_site' | |
- name: Deploy | |
uses: actions/deploy-pages@v4 |