sample/.forgejo/workflows/demo.yml
Chris Thompson a8618a66f5
Some checks are pending
/ build (push) Successful in 6s
/ deploy (push) Waiting to run
Do the same thing (again, almost) for the second step
2025-05-22 17:30:51 -04:00

63 lines
1.7 KiB
YAML

on:
push:
branches:
- main
jobs:
build:
runs-on: docker
container:
image: git.agaric.com/agaric/deploycontainer:latest
credentials:
username: ${ github.actor }
password: ${ secrets.github_token }
env:
COMPOSER_ARGS: "install --no-dev --ignore-platform-reqs --no-scripts --optimize-autoloader"
steps:
- name: checkout
uses: actions/checkout@v3
- name: beep
run: |
echo "Beep!"
echo "Beep!"
# - name: composer install
# run: |
# composer config -g gitlab-token.git.drupalcode.org "${{ secrets.COMPOSER_TOKEN }}"
# composer ${COMPOSER_ARGS}
- name: save build
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: build
path: |
config/*
drush/*
scripts/*
vendor/*
web/*
composer.*
deploy:
needs: build
if: vars.DEPLOY_TEST == 1
environment:
name: test
url: https://app.housingworks.net/
env:
BACKUP_DIR: "/home/app_test/backups"
BUILD_ROOT: build
SSH_TARGET: test
DEPLOY_ENV: test
DEPLOY_ROOT: /var/www/app.housingworks.net
DRUSH_DISABLE: ${{ vars.DRUSH_DISABLE }}
GOOGLEMAPS_API_KEY: ${{ secrets.GOOGLEMAPS_API_KEY }}
container:
image: git.agaric.com/agaric/deploycontainer:0.0.3
credentials:
username: ${ github.actor }
password: ${ secrets.github_token }
steps:
- name: retrieve artifacts
uses: https://code.forgejo.org/forgejo/download-artifact@v4
- name: deploy to test
run: |
eval `ssh-agent -s`
ssh-add -l