From fd84ef7df17e1941f1ad8bdc458a8f47e4534ac8 Mon Sep 17 00:00:00 2001 From: Gabe R Date: Thu, 20 Feb 2020 15:19:05 -0700 Subject: [PATCH] Switched over to GitHub Actions --- .github/workflows/buildAndDeploy.yml | 45 ++++++++++++++++++++++++++++ .github/workflows/testCompile.yml | 22 ++++++++++++++ .travis.yml | 24 --------------- 3 files changed, 67 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/buildAndDeploy.yml create mode 100644 .github/workflows/testCompile.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/buildAndDeploy.yml b/.github/workflows/buildAndDeploy.yml new file mode 100644 index 0000000..b51530a --- /dev/null +++ b/.github/workflows/buildAndDeploy.yml @@ -0,0 +1,45 @@ +name: Build PDF for Release + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2.0.0 + + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y texlive-xetex + - name: Build Document + run: xelatex Resume.tex + + - name: Get Current DateTime + id: getdate + run: echo "::set-output name=dtVal::$(date +'%Y-%m-%d_%H.%M')" + + - name: Create Release + uses: actions/create-release@v1 + id: create_release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{steps.getdate.outputs.dtVal}} + release_name: Resume ${{steps.getdate.outputs.dtVal}} + draft: true + prerelease: false + + - name: Add resume PDF + uses: actions/upload-release-asset@v1.0.2 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./Resume.pdf + asset_name: Resume.pdf + asset_content_type: application/pdf diff --git a/.github/workflows/testCompile.yml b/.github/workflows/testCompile.yml new file mode 100644 index 0000000..82ac1d8 --- /dev/null +++ b/.github/workflows/testCompile.yml @@ -0,0 +1,22 @@ +name: Check For Errors +on: + push: + branches-ignore: # Do not check against the master branch, as this is already checked by the build and deploy script + - master + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2.0.0 + + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y texlive-xetex + - name: Build and Check Document + run: xelatex Resume.tex + + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0bb87da..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -distro: bionic -language: minimal -branches: - only: - - master -before_install: -- sudo apt-get update -- sudo apt-get install -y texlive-xetex texlive-generic-extra texlive-fonts-recommended lmodern -script: -- xelatex Resume.tex -before_deploy: -- git config --local user.name "Marsfan" -- git config --local user.email "Marsfan@users.noreply.github.com" -- export TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y-%m-%d_%H.%M')} -- git tag $TRAVIS_TAG -deploy: - provider: releases - api_key: - secure: Cty5u03SnCOTee2wPu+r9figVRc3afPHPVyg1YWnHPaOaLGww/eeSRXpyEUCmFgZR0fnJXz6PWhbW0/6Clv87EAy7jQLEXnb9zQJTxxtUBkeBcaRFAMj/3c1AEqu9saWW3sxgoUxoVVNXjH5NbACwa+EOyKAMskeMNdk2w3ybLDed+X4+d8bIHzq+9J7RhWWzxWiGVUGbNhO2/+nF5PrP6yMs39RyrCGr/eqPKh/zZANDnYds7bRQlVl1WcYi7ggmImACuMzO51vLM/wIZBGR24u4H7c4g622IP8VZjD2egiuJbgJ792tNNsNNgIjyy2bYkz2PTCYyCWt3jzJWWt5vY2emUFdOgF+ENSqE6iBIzDBj6JxRRsezOuLRVzioEMaHJZlOJzQKb1tGpzPUugvlpoc7Sdm7lWIXHA92uoFSQElPuzlIzNDemLk6QIhc5YHKjIJ/wAcSGHNoBHsglNw0Mr6C2unWIRDOyxahaoDabM+NvOUR5nxni2wFa1C5RPsFkzoIjfWPlgjtEsVS9559l1W1ZdzPj14MPjxMFEGg0SCxMGaLDOxgtoOnB6K6Fu1DVpA12fDpzkN10yLtbKKyZcA4Ed6KfU783qrMd794syEVlsF++kpShM2fD3MgoBHpjzQsx1jxp9pTkFB0V45jcvY8PsQjVkwewae5jx9HQ= - file: Resume.pdf - skip_cleanup: true - name: Resume $TRAVIS_TAG - on: - repo: Marsfan/Gabriel-Roper-Resume