test: Add comment to test GitHub Actions token #6
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: Deploy to Development | |
| # Test workflow with ACTIONS token | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: self-hosted | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| with: | |
| token: ${{ secrets.ACTIONS }} | |
| - name: Load Environment Variables | |
| uses: falti/dotenv-action@v1.1.4 | |
| with: | |
| export-variables: true | |
| keys-case: bypass | |
| - name: Build Docker Image for Frontend | |
| run: | | |
| cd frontend | |
| sudo docker build -t secfit-frontend:latest . | |
| - name: Stop and Remove Existing Container | |
| run: | | |
| sudo docker rm -f secfit-frontend || true | |
| - name: Run New Container | |
| run: | | |
| sudo docker run -d \ | |
| --name secfit-frontend \ | |
| -p 3000:3000 \ | |
| --restart unless-stopped \ | |
| -e NODE_ENV=production \ | |
| secfit-frontend:latest | |
| - name: Verify Deployment | |
| run: | | |
| sudo docker ps | |
| echo "Waiting for container to be healthy..." | |
| sleep 10 | |
| curl -f http://localhost:3000 || exit 1 |