ci: hide hardcode paths #23
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: Node.js CI/CD | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
branches: ['main'] | |
jobs: | |
build: | |
runs-on: [self-hosted, Linux, X64] | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install Dependencies and Build | |
run: | | |
npm ci | |
npm run build | |
deploy: | |
needs: build | |
runs-on: [self-hosted, Linux, X64] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Make deploy.sh executable | |
run: chmod +x ./deploy.sh | |
- name: Execute deploy.sh | |
run: | | |
echo "${{ secrets.DVNS_CLUSTER_PASSWORD }}" | sudo -S ./deploy.sh "$(pwd)/dist" "${{ secrets.CERT_PATH }}" |