diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..2ef73f15 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,48 @@ +name: Deploy + +on: + push: + branches: ['main'] + +jobs: + build: + runs-on: ubuntu-latest + + container: pandoc/latex + + steps: + - uses: actions/checkout@v4 + + - name: Install mustache (to update the date) + + run: apk add ruby && gem install mustache + + - name: creates output + + run: sh ./build.sh + + - name: Pushes to another repository + + id: push_directory + + uses: cpina/github-action-push-to-another-repository@main + + env: + API_TOKEN_GITHUB: ${{ secrets.AUTO_ACTIONS }} + + with: + source-directory: 'output' + + destination-github-username: un0211 + + destination-repository-name: taskify + + user-email: ${{ secrets.EMAIL }} + + commit-message: ${{ github.event.commits[0].message }} + + target-branch: main + + - name: Test get variable exported by push-to-another-repository + + run: echo $DESTINATION_CLONED_DIRECTORY diff --git a/.github/workflows/deploy_dev.yml b/.github/workflows/deploy_dev.yml new file mode 100644 index 00000000..6190b9a8 --- /dev/null +++ b/.github/workflows/deploy_dev.yml @@ -0,0 +1,48 @@ +name: Deploy + +on: + push: + branches: ['develop'] + +jobs: + build: + runs-on: ubuntu-latest + + container: pandoc/latex + + steps: + - uses: actions/checkout@v4 + + - name: Install mustache (to update the date) + + run: apk add ruby && gem install mustache + + - name: creates output + + run: sh ./build.sh + + - name: Pushes to another repository + + id: push_directory + + uses: cpina/github-action-push-to-another-repository@main + + env: + API_TOKEN_GITHUB: ${{ secrets.AUTO_ACTIONS }} + + with: + source-directory: 'output' + + destination-github-username: un0211 + + destination-repository-name: taskify + + user-email: ${{ secrets.EMAIL }} + + commit-message: ${{ github.event.commits[0].message }} + + target-branch: develop + + - name: Test get variable exported by push-to-another-repository + + run: echo $DESTINATION_CLONED_DIRECTORY diff --git a/build.sh b/build.sh new file mode 100644 index 00000000..6b4dd0d1 --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cd ../ +mkdir output +cp -R ./taskify/* ./output +cp -R ./output ./taskify/ \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2edc0b3c..d8500711 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,9 +21,6 @@ importers: '@commitlint/cli': specifier: ^19.3.0 version: 19.3.0(@types/node@20.14.5)(typescript@5.4.5) - '@commitlint/config-conventional': - specifier: ^19.2.2 - version: 19.2.2 '@types/node': specifier: ^20 version: 20.14.5 @@ -91,10 +88,6 @@ packages: engines: {node: '>=v18'} hasBin: true - '@commitlint/config-conventional@19.2.2': - resolution: {integrity: sha512-mLXjsxUVLYEGgzbxbxicGPggDuyWNkf25Ht23owXIH+zV2pv1eJuzLK3t1gDY5Gp6pxdE60jZnWUY5cvgL3ufw==} - engines: {node: '>=v18'} - '@commitlint/config-validator@19.0.3': resolution: {integrity: sha512-2D3r4PKjoo59zBc2auodrSCaUnCSALCx54yveOFwwP/i2kfEAQrygwOleFWswLqK0UL/F9r07MFi5ev2ohyM4Q==} engines: {node: '>=v18'} @@ -565,10 +558,6 @@ packages: resolution: {integrity: sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==} engines: {node: '>=16'} - conventional-changelog-conventionalcommits@7.0.2: - resolution: {integrity: sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==} - engines: {node: '>=16'} - conventional-commits-parser@5.0.0: resolution: {integrity: sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==} engines: {node: '>=16'} @@ -2078,11 +2067,6 @@ snapshots: - '@types/node' - typescript - '@commitlint/config-conventional@19.2.2': - dependencies: - '@commitlint/types': 19.0.3 - conventional-changelog-conventionalcommits: 7.0.2 - '@commitlint/config-validator@19.0.3': dependencies: '@commitlint/types': 19.0.3 @@ -2609,10 +2593,6 @@ snapshots: dependencies: compare-func: 2.0.0 - conventional-changelog-conventionalcommits@7.0.2: - dependencies: - compare-func: 2.0.0 - conventional-commits-parser@5.0.0: dependencies: JSONStream: 1.3.5