Merge pull request #264 from FACT-Finder/renovate/all #147
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
name: deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: cache node_modules | |
uses: actions/cache@v4 | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-node_modules- | |
- run: yarn --frozen-lockfile | |
- name: Get Version | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV | |
- run: yarn docs build | |
- run: yarn lerna run build | |
env: | |
BUILD_VERSION: ${{ env.VERSION }} | |
- name: upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: packages/snage/build/npm | |
- name: upload docs artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: site | |
deploy-docker-unstable: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
path: packages/snage/build/npm | |
- name: Publish master as snage/snage:unstable to Docker | |
run: | | |
echo "$DOCKER_PASS" | docker login --username "$DOCKER_USER" --password-stdin | |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > $HOME/.npmrc | |
docker build -t snage/snage:unstable packages/snage | |
docker push snage/snage:unstable | |
env: | |
DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
DOCKER_PASS: ${{ secrets.DOCKER_PASS }} | |
deploy-snage-changelog: | |
runs-on: ubuntu-latest | |
needs: deploy-docker-unstable | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Deploy changelog.snage.dev | |
run: | | |
export ANSIBLE_PRIVATE_KEY_FILE="$HOME/id_rsa" | |
echo "$SSH_KEY" > $HOME/id_rsa | |
chmod 600 $HOME/id_rsa | |
ansible-playbook -i [email protected], -e "SNAGE_VERSION=unstable" ansible/deploy-snage.yml | |
env: | |
SSH_KEY: ${{ secrets.SSH_KEY }} | |
ANSIBLE_HOST_KEY_CHECKING: false | |
deploy-github-pages: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: docs | |
path: site | |
- name: Deploy Docs | |
uses: JamesIves/[email protected] | |
with: | |
BRANCH: gh-pages | |
FOLDER: site | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} |