-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
459d6cd
commit f36cff1
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Build template | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build docker image | ||
run: docker-compose build | ||
|
||
- name: Run docker container | ||
run: docker-compose up -d | ||
|
||
- name: Test if service is reachable | ||
run: | | ||
curl -v -s --retry 10 --retry-connrefused http://localhost:8000/ | ||
- name: Report error to Sentry | ||
if: failure() | ||
run: | | ||
curl -sL https://sentry.io/get-cli/ | bash | ||
export SENTRY_DSN=${{ secrets.SENTRY_DSN }} | ||
MESSAGE="Error in action: ${{ github.workflow }} run. Check <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}> for more details in ${{ github.repository }}" | ||
sentry-cli send-event -m "$MESSAGE" --log-level=error |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Deploy template | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install divio-cli | ||
- name: Deploy to Divio | ||
run: | | ||
divio login ${{ secrets.DIVIO_TOKEN }} | ||
divio app deploy test --remote-id ${{ secrets.DIVIO_WEBSITE_ID }} | ||
- name: Test if website is reachable | ||
run: | | ||
curl -v -s --retry 10 --retry-connrefused ${{ secrets.WEBSITE_URL }} |
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