diff --git a/.github/deploy.yml b/.github/deploy.yml new file mode 100644 index 0000000..3151f8a --- /dev/null +++ b/.github/deploy.yml @@ -0,0 +1,34 @@ +name: GitHub Pages Deployment + +on: + push: + branches: + - master + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '14' + + - name: Install TypeScript + run: npm install -g typescript + + - name: Compile TypeScript + run: tsc + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: . + publish_branch: gh-pages + exclude_assets: .github,src,.gitignore,app.js.map,LICENSE,README.md,tsconfig.json + full_commit_message: Deploy to Github Pages \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6977dcd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: node_js -node_js: - - 10 - -branches: - only: - - master - -install: - - npm install -g typescript - -script: - - tsc || travis_terminate 1 - - - git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/* - - git fetch origin gh-pages - - git checkout --detach - - git reset --soft origin/gh-pages - - git config user.name "Travis CI" - - git config user.email "travis@travis-ci.org" - - git reset . - - rm .gitignore - - git add index.html app.css app.js favicon.png - - git commit -m "Render page" || travis_terminate 0 - - git branch -f gh-pages - - git checkout gh-pages - - git push "https://$GITHUB_API_KEY@github.com/marian42/partdesigner.git" \ No newline at end of file