-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use actions/upload-pages-artifact to deploy instead of gh-pages branch
- Loading branch information
Showing
7 changed files
with
20 additions
and
170 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy | ||
name: Deploy Pages | ||
|
||
on: | ||
push: | ||
|
@@ -9,47 +9,27 @@ jobs: | |
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Clone repo | ||
uses: actions/checkout@v1 | ||
|
||
- name: Setup SSH deploy key | ||
run: | | ||
ssh-agent >| ~/.ssh-agent.env | ||
source ~/.ssh-agent.env >| /dev/null | ||
mkdir -p ~/.ssh | ||
echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==" >> ~/.ssh/known_hosts | ||
KEY_FILE=~/.ssh/deploy_key | ||
echo "${DEPLOY_SSH_PRIVATE_KEY}" | base64 --decode > $KEY_FILE | ||
chmod 600 $KEY_FILE | ||
ssh-add $KEY_FILE | ||
env: | ||
DEPLOY_SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }} | ||
shell: bash | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v1 | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: node-modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Cache _ghpages.git | ||
uses: actions/cache@v1 | ||
with: | ||
path: _ghpages.git | ||
key: node-modules-${{ runner.os }}-${{ hashFiles('**/deploy.sh') }} | ||
|
||
- name: Deploy | ||
- name: Build | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Rainmeter Bot" | ||
npm install | ||
source ~/.ssh-agent.env >| /dev/null | ||
npm run deploy | ||
npm run build | ||
shell: bash | ||
|
||
- name: Upload Pages artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./public |
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
*debug.log | ||
_generated | ||
public/ | ||
_generated/ | ||
node_modules/ | ||
_ghpages.git | ||
.deploy_git | ||
db.json | ||
node_modules | ||
yarn-error.log |
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
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
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