aaingyunii / workflow-flyio-in-GithubActions

Fly.io 를 Github Actions 를 통해 자동 배포하는 학습
https://portfolio-aik.fly.dev/
Other
0 stars 0 forks source link

Workflow-flyio-in-GithubActions

Deploy fly.io

$ fly auth login

$ flyctl launch

$ fly auth token

### then you register this token 
### to your repository's secret actions

# make .github/workflows/main.yml
name: Fly Deploy
on: [push]
env:
  FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
  deploy:
      name: Deploy app
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v4 ### nowdays it enforced to use node 16, not node 12 version
                            ### so, actions/checkout@v4 is right, not actions/checkout@v2
        - uses: superfly/flyctl-actions/setup-flyctl@master
        - run: flyctl deploy

$ git add .
$ git commit -m "Configure auto-deploy through GitHub Actions"
$ git push

REF