Skip to content

improvements

improvements #79

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install dependencies
run: npm install
- name: Build image
run: docker build -t scimverify-test .
- name: Test against Laravel SCIM Server
run: |
# Start the Laravel SCIM server in the background
docker run -d -p 8000:8000 --name laravel-scim-server ghcr.io/limosa-io/laravel-scim-server:latest
# Wait for server to be ready
timeout 60 bash -c 'until curl -f http://localhost:8000/scim/v2/Schemas; do sleep 2; done'
# Run scimverify tests against the server
npx node ./bin/scimverify.js --config ./site/.vitepress/theme/components/config.yaml --baseUrl http://localhost:8000
# Cleanup
docker stop laravel-scim-server
docker rm laravel-scim-server
deploy:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install dependencies
run: cd ./site/ && npm install
- name: Build site
run: cd ./site/ && npm run build
env:
VITE_SCIM_TEST_SERVER_URL: ${{ secrets.VITE_SCIM_TEST_SERVER_URL }}
VITE_TURNSTILE_SITE_KEY: ${{ secrets.VITE_TURNSTILE_SITE_KEY }}
- name: Install Netlify CLI
run: npm install -g netlify-cli
- name: Deploy to Netlify
run: netlify deploy --prod --dir=./site/.vitepress/dist
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- name: Push to dokku
uses: dokku/github-action@master
with:
git_remote_url: "ssh://[email protected]:22/verify"
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
git_push_flags: '--force'
- name: Build image
run: docker build -t scimverify-test .
- name: Authenticate to GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
- name: Push image
run: docker push ghcr.io/${{ github.repository }}:latest