-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added GitHub Actions workflow for deployment
- Loading branch information
1 parent
5f9aac3
commit 9acb809
Showing
1 changed file
with
38 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Deploy to tibrahimm.github.io | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Check out source code | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
# Set up Node.js | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
# Install dependencies | ||
- name: Install dependencies | ||
run: yarn install | ||
|
||
# Build project | ||
- name: Build | ||
run: yarn build | ||
|
||
# Deploy to target repo | ||
- name: Deploy | ||
env: | ||
# You'll need to add this secret in your repo settings | ||
GITHUB_TOKEN: ${{ secrets.DEPLOY_TOKEN }} | ||
run: | | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "github-actions[bot]" | ||
npx gh-pages -d dist -r https://${GITHUB_TOKEN}@github.com/t-ibrahimm/t-ibrahimm.github.io.git |