Split workflow.
This commit is contained in:
parent
23f2acc8ec
commit
437c45523e
41
.github/workflows/build.yml
vendored
41
.github/workflows/build.yml
vendored
|
@ -18,30 +18,19 @@ jobs:
|
||||||
# make -C drf-initiation test
|
# make -C drf-initiation test
|
||||||
# make -C django-initiation test
|
# make -C django-initiation test
|
||||||
|
|
||||||
build:
|
build_and_publish:
|
||||||
needs: test
|
needs: test
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
steps:
|
matrix:
|
||||||
- uses: actions/checkout@v1
|
directory:
|
||||||
- name: publish
|
- python-initiation
|
||||||
env:
|
- python-avance
|
||||||
deploy_key: ${{secrets.deploy_key}}
|
- drf-initiation
|
||||||
known_hosts: ${{secrets.known_hosts}}
|
- django-initiation
|
||||||
run: |
|
- python-perfs
|
||||||
mkdir -p ${HOME}/.ssh
|
secrets:
|
||||||
printf "%s\n" "$known_hosts" > ${HOME}/.ssh/known_hosts
|
deploy_key: ${{ secrets.deploy_key }}
|
||||||
printf "%s\n" "$deploy_key" > ${HOME}/.ssh/id_ed25519
|
known_hosts: ${{ secrets.known_hosts }}
|
||||||
chmod 600 ${HOME}/.ssh/id_ed25519
|
uses: JulienPalard/formations/.github/workflows/deploy.yml@main
|
||||||
eval $(ssh-agent)
|
with:
|
||||||
ssh-add
|
directory: ${{ matrix.directory }}
|
||||||
rm ${HOME}/.ssh/id_ed25519
|
|
||||||
export deploy_key=""
|
|
||||||
python3 -m pip install --user --upgrade pip
|
|
||||||
python3 -m pip install --user mdtoreveal
|
|
||||||
export PATH="$HOME/.local/bin/:$PATH"
|
|
||||||
make -C python-initiation rsync
|
|
||||||
make -C python-avance rsync
|
|
||||||
make -C drf-initiation rsync
|
|
||||||
make -C django-initiation rsync
|
|
||||||
sudo apt-get install -y cutycapt
|
|
||||||
QT_QPA_PLATFORM=offscreen make -C python-perfs rsync
|
|
||||||
|
|
41
.github/workflows/deploy.yml
vendored
Normal file
41
.github/workflows/deploy.yml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
directory:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
secrets:
|
||||||
|
deploy_key:
|
||||||
|
required: true
|
||||||
|
known_hosts:
|
||||||
|
required: true
|
||||||
|
jobs:
|
||||||
|
build_and_publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
- run: |
|
||||||
|
sudo apt-get install -y cutycapt
|
||||||
|
- name: Build and Publish
|
||||||
|
env:
|
||||||
|
deploy_key: ${{secrets.deploy_key}}
|
||||||
|
known_hosts: ${{secrets.known_hosts}}
|
||||||
|
QT_QPA_PLATFORM: offscreen
|
||||||
|
run: |
|
||||||
|
mkdir -p ${HOME}/.ssh
|
||||||
|
printf "%s\n" "$known_hosts" > ${HOME}/.ssh/known_hosts
|
||||||
|
printf "%s\n" "$deploy_key" > ${HOME}/.ssh/id_ed25519
|
||||||
|
chmod 600 ${HOME}/.ssh/id_ed25519
|
||||||
|
eval $(ssh-agent)
|
||||||
|
ssh-add
|
||||||
|
rm ${HOME}/.ssh/id_ed25519
|
||||||
|
export deploy_key=""
|
||||||
|
python3 -m pip install --user --upgrade pip
|
||||||
|
python3 -m pip install --user mdtoreveal
|
||||||
|
export PATH="$HOME/.local/bin/:$PATH"
|
||||||
|
make -C ${{ inputs.directory }} rsync
|
Loading…
Reference in New Issue
Block a user