Access secrets correctly
This commit is contained in:
parent
fb22623632
commit
8aa14c5bbf
1 changed files with 8 additions and 7 deletions
15
.github/workflows/deploy.yml
vendored
15
.github/workflows/deploy.yml
vendored
|
@ -8,6 +8,7 @@ jobs:
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy (Test)
|
name: Deploy (Test)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
environment: Deployments
|
||||||
env:
|
env:
|
||||||
repository: 'jonnybarnes/jonnybarnes.uk'
|
repository: 'jonnybarnes/jonnybarnes.uk'
|
||||||
host: 'jonnybarnes.uk'
|
host: 'jonnybarnes.uk'
|
||||||
|
@ -27,7 +28,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
host: ${{ env.host }}
|
host: ${{ env.host }}
|
||||||
username: ${{ env.username }}
|
username: ${{ env.username }}
|
||||||
key: ${{ secrets.KEY }}
|
key: ${{ secrets.DEPLOYMENT_KEY }}
|
||||||
script: |
|
script: |
|
||||||
[ -d ${{ env.releasesDir }} ] || mkdir ${{ env.releasesDir }}
|
[ -d ${{ env.releasesDir }} ] || mkdir ${{ env.releasesDir }}
|
||||||
[ -d ${{ env.persistentDir }}/storage ] || mkdir ${{ env.persistentDir }}/storage
|
[ -d ${{ env.persistentDir }}/storage ] || mkdir ${{ env.persistentDir }}/storage
|
||||||
|
@ -49,7 +50,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
host: ${{ env.host }}
|
host: ${{ env.host }}
|
||||||
username: ${{ env.username }}
|
username: ${{ env.username }}
|
||||||
key: ${{ secrets.KEY }}
|
key: ${{ secrets.DEPLOYMENT_KEY }}
|
||||||
script: |
|
script: |
|
||||||
cd ${{ env.newReleaseDir }}
|
cd ${{ env.newReleaseDir }}
|
||||||
composer install --prefer-dist --no-scripts --no-dev --no-progress --optimize-autoloader --quiet --no-interaction
|
composer install --prefer-dist --no-scripts --no-dev --no-progress --optimize-autoloader --quiet --no-interaction
|
||||||
|
@ -59,7 +60,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
host: ${{ env.host }}
|
host: ${{ env.host }}
|
||||||
username: ${{ env.username }}
|
username: ${{ env.username }}
|
||||||
key: ${{ secrets.KEY }}
|
key: ${{ secrets.DEPLOYMENT_KEY }}
|
||||||
script: |
|
script: |
|
||||||
# Import the environment config
|
# Import the environment config
|
||||||
cd ${{ env.newReleaseDir }};
|
cd ${{ env.newReleaseDir }};
|
||||||
|
@ -70,7 +71,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
host: ${{ env.host }}
|
host: ${{ env.host }}
|
||||||
username: ${{ env.username }}
|
username: ${{ env.username }}
|
||||||
key: ${{ secrets.KEY }}
|
key: ${{ secrets.DEPLOYMENT_KEY }}
|
||||||
script: |
|
script: |
|
||||||
cd ${{ env.newReleaseDir }};
|
cd ${{ env.newReleaseDir }};
|
||||||
php artisan clear-compiled;
|
php artisan clear-compiled;
|
||||||
|
@ -80,7 +81,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
host: ${{ env.host }}
|
host: ${{ env.host }}
|
||||||
username: ${{ env.username }}
|
username: ${{ env.username }}
|
||||||
key: ${{ secrets.KEY }}
|
key: ${{ secrets.DEPLOYMENT_KEY }}
|
||||||
script: |
|
script: |
|
||||||
cd ${{ env.newReleaseDir }}
|
cd ${{ env.newReleaseDir }}
|
||||||
#php artisan migrate --force
|
#php artisan migrate --force
|
||||||
|
@ -90,7 +91,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
host: ${{ env.host }}
|
host: ${{ env.host }}
|
||||||
username: ${{ env.username }}
|
username: ${{ env.username }}
|
||||||
key: ${{ secrets.KEY }}
|
key: ${{ secrets.DEPLOYMENT_KEY }}
|
||||||
script: |
|
script: |
|
||||||
ln -nfs ${{ env.newReleaseDir }} ${{ env.currentDir }};
|
ln -nfs ${{ env.newReleaseDir }} ${{ env.currentDir }};
|
||||||
cd ${{ env.newReleaseDir }}
|
cd ${{ env.newReleaseDir }}
|
||||||
|
@ -108,7 +109,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
host: ${{ env.host }}
|
host: ${{ env.host }}
|
||||||
username: ${{ env.username }}
|
username: ${{ env.username }}
|
||||||
key: ${{ secrets.KEY }}
|
key: ${{ secrets.DEPLOYMENT_KEY }}
|
||||||
script: |
|
script: |
|
||||||
cd ${{ env.releasesDir }}
|
cd ${{ env.releasesDir }}
|
||||||
ls -dt ${{ env.releasesDir }}/* | tail -n +4 | xargs -d "\n" sudo chown -R jonny .;
|
ls -dt ${{ env.releasesDir }}/* | tail -n +4 | xargs -d "\n" sudo chown -R jonny .;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue