chore: removed commented debug-code #25
Workflow file for this run
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: Build and Push bit-SveliaCMS to singtonic | |
on: | |
push: | |
tags: | |
- '*' # Trigger only on push of any tag | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' # Specify the Node.js version needed | |
- name: Install dependencies | |
run: npm install | |
- name: Build Svelte project | |
run: npm run build | |
- name: Setup SSH | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan github.com >> ~/.ssh/known_hosts | |
- name: Deploy to another repository | |
run: | | |
git config --global user.name "GitHub Action" | |
git config --global user.email "[email protected]" | |
git clone --depth=1 [email protected]:baenecke-it/singtonic.git target-repo | |
cp -r dist/sveltia-cms.js target-repo/static/admin/ # Copy the output file to the specific subfolder | |
cd target-repo | |
git add static/admin/sveltia-cms.js # Only add the specific file | |
git commit -m "Update sveltia-cms.js from ${GITHUB_REPOSITORY}" | |
git push origin master |