- Npm install –g surge
- Surge token
- Surge
For create secrete key global variable
- Setting -> Secrets
- Name and add surge token value
Surge Deployment Using github actions CI/CD :
-
First deploy code on github repo
-
After create secrete key variable
-
Click on actions
-
Clcik on set up a workflow yourself name: Continuous Deployment on: [push]
jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2
- run: echo "Setting up NodeJs" - name: Setup NodeJs uses: actions/setup-node@v1 with: node-version: 12.x - run: npm install -g surge - run: echo "Deploying website" - run: surge ./ ${{ secrets.SURGE_DOMAIN }} --token ${{ secrets.SURGE_TOKEN }} - run: echo "Please visit => ${{ secrets.SURGE_DOMAIN }}"