generated from figuren-theater/new-ft-module
-
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.
Save release as github artifact and re-use it for deployment (#34)
## *What has changed?*: ## *Why was it needed?*: ## *How was it done?*: ## Links to trello Tickets or github issues: * --- ### Code Checklist - [ ] tested - [ ] documented
- Loading branch information
Showing
2 changed files
with
46 additions
and
31 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 |
---|---|---|
|
@@ -17,44 +17,51 @@ jobs: | |
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
# - name: Checkout code | ||
# uses: actions/checkout@v4 | ||
|
||
- name: Prepare auth Token | ||
run: composer global config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Prepare auth Token | ||
# run: composer global config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get latest commit ID from ft-platform-collection | ||
id: platform-collection | ||
run: | | ||
echo "commit_id={$(git ls-remote https://github.com/figuren-theater/ft-platform-collection.git refs/heads/main | awk '{ print $1 }')}" >> $GITHUB_OUTPUT | ||
# - name: Get latest commit ID from ft-platform-collection | ||
# id: platform-collection | ||
# run: | | ||
# echo "commit_id={$(git ls-remote https://github.com/figuren-theater/ft-platform-collection.git refs/heads/main | awk '{ print $1 }')}" >> $GITHUB_OUTPUT | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: | | ||
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ github.sha }}-${{ steps.platform-collection.outputs.commit_id }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
# - name: Get Composer Cache Directory | ||
# id: composer-cache | ||
# run: | | ||
# echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
# - uses: actions/cache@v4 | ||
# with: | ||
# path: ${{ steps.composer-cache.outputs.dir }} | ||
# key: ${{ runner.os }}-composer-${{ github.sha }}-${{ steps.platform-collection.outputs.commit_id }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-composer- | ||
|
||
- name: Install composer dependencies | ||
run: composer install --no-dev --prefer-dist --no-interaction | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Install composer dependencies | ||
# run: composer install --no-dev --prefer-dist --no-interaction | ||
# env: | ||
# COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install all platform dependencies | ||
run: composer require figuren-theater/ft-platform-collection --prefer-dist --no-interaction | ||
# - name: Install all platform dependencies | ||
# run: composer require figuren-theater/ft-platform-collection --prefer-dist --no-interaction | ||
|
||
# Help moving files (which koodimoni/dropin-installer is not capable for, see #11) | ||
- name: Copy files (accompanying koodimoni) | ||
run: | | ||
cp content/mu-plugins/FT/ft-data/templates/htdocs/vendor/rss-bridge/rss-bridge/whitelist.txt vendor/rss-bridge/rss-bridge/whitelist.txt && | ||
cp content/mu-plugins/FT/ft-maintenance/templates/htdocs/wp-content/db-error.php content/db-error.php && | ||
cp content/mu-plugins/FT/ft-maintenance/templates/htdocs/wp-content/maintenance.php content/maintenance.php && | ||
cp content/plugins/sqlite-object-cache/assets/drop-in/object-cache.php content/object-cache.php | ||
# # Help moving files (which koodimoni/dropin-installer is not capable for, see #11) | ||
# - name: Copy files (accompanying koodimoni) | ||
# run: | | ||
# cp content/mu-plugins/FT/ft-data/templates/htdocs/vendor/rss-bridge/rss-bridge/whitelist.txt vendor/rss-bridge/rss-bridge/whitelist.txt && | ||
# cp content/mu-plugins/FT/ft-maintenance/templates/htdocs/wp-content/db-error.php content/db-error.php && | ||
# cp content/mu-plugins/FT/ft-maintenance/templates/htdocs/wp-content/maintenance.php content/maintenance.php && | ||
# cp content/plugins/sqlite-object-cache/assets/drop-in/object-cache.php content/object-cache.php | ||
|
||
- name: Download artifact from dry-run-deploy job | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ft-platform-release | ||
|
||
- name: unzip artifact for deployment | ||
run: unzip release.zip | ||
|
||
- name: Deploy | ||
uses: SamKirkland/[email protected] | ||
|
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 |
---|---|---|
|
@@ -53,7 +53,15 @@ jobs: | |
cp content/mu-plugins/FT/ft-maintenance/templates/htdocs/wp-content/maintenance.php content/maintenance.php && | ||
cp content/plugins/sqlite-object-cache/assets/drop-in/object-cache.php content/object-cache.php | ||
- name: Zip artifact | ||
run: zip release.zip ./* -r | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ft-platform-release | ||
path: release.zip | ||
|
||
- name: Deploy | ||
uses: SamKirkland/[email protected] | ||
with: | ||
|