Skip to content

Commit

Permalink
ci: deploy to fly on push
Browse files Browse the repository at this point in the history
  • Loading branch information
sitiom authored and github-actions[bot] committed Jan 5, 2024
1 parent a3fd448 commit eae2fbb
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/fly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Deploy to Fly

on:
push:
branches: ["main"]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Wait for other checks to succeed
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
running-workflow-name: deploy
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/update-fork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Update Fork

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
auto-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.PAT }} # So that the workflow triggers on fork update
- uses: fregante/setup-git-user@v2
- name: Check if fork is synced with upstream
id: check_sync
uses: MadLadSquad/[email protected]
with:
upstream-url: "https://github.com/iJSD-Org/IacDiscordNotifs"
first-branch: main
second-branch: main
- name: Rebase on top of base branch
if: steps.check_sync.outputs.behind > 0
run: |
git remote add upstream https://github.com/iJSD-Org/IacDiscordNotifs
git fetch upstream
git rebase upstream/main
git commit --amend --no-edit
git push -f

0 comments on commit eae2fbb

Please sign in to comment.