✅ update icon #122
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: Deployment | |
on: | |
push: | |
branches: | |
- hrm | |
env: | |
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
TELEGRAM_GROUP_ID: ${{ vars.TELEGRAM_GROUP_ID }} | |
TELEGRAM_TOPIC_ID: ${{ vars.TELEGRAM_TOPIC_ID }} | |
jobs: | |
build: | |
name: Build iconmoon | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 5 | |
steps: | |
- name: Check out Git repository (Core branch) | |
uses: actions/checkout@v4 | |
with: | |
ref: core | |
path: core | |
- name: Check out Git repository (hrm branch) | |
uses: actions/checkout@v4 | |
with: | |
ref: hrm | |
path: app | |
- name: Check out Git repository (gh-pages branch) | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
path: gh-pages | |
- name: Send telegram message | |
uses: PacificPromise/macos-telegram-action@main | |
with: | |
type: topic | |
message: "🎬 - Start deploy icons HRM" | |
- name: Run npm install | |
run: cd core && npm install | |
- name: Run npm start | |
run: cd core && npm start | |
- name: Move hrm file | |
run: rm -rf gh-pages/hrm && mv core/output gh-pages/hrm | |
- name: Create index file | |
run: cp gh-pages/hrm/demo.html gh-pages/hrm/index.html | |
- name: Setup secret id_rsa | |
env: | |
ID_RSA: ${{ secrets.ID_RSA }} | |
run: echo "$ID_RSA" > gh-pages/.key/id_rsa | |
- name: Push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cd gh-pages | |
DIR_NAME=$(pwd) | |
chmod 400 "$DIR_NAME/.key/id_rsa" | |
export GIT_SSH_COMMAND="ssh -i $DIR_NAME/.key/id_rsa -o IdentitiesOnly=yes" | |
git config user.name "GitHub Actions" --local | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" --local | |
git remote set-url origin [email protected]:LibertyCarz/icons.git | |
git status | |
git add -A | |
git commit -m ':white_check_mark: update HRM icon' | |
git push origin gh-pages | |
- name: Send success telegram message | |
uses: PacificPromise/macos-telegram-action@main | |
with: | |
type: topic | |
message: "✅ - Success build icons HRM" | |
- name: Send message failure | |
if: failure() | |
uses: PacificPromise/macos-telegram-action@main | |
with: | |
type: topic | |
message: "💥 - Failure build icons HRM" |