Enhance deployment workflow by adding dependency installation and Typ… #12
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: Sync with Panel | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Install Dependencies | |
run: npm install | |
- name: Transpile TypeScript | |
run: npx tsc | |
- name: Run Deployment Script | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
PANEL_URL: ${{ secrets.PANEL_URL }} | |
SERVER_ID: ${{ secrets.SERVER_ID }} | |
run: | | |
node dist/scripts/sync.js |