Skip to content

Releases: ledwindra/continuous-integration-stata

Publish to marketplace

24 Apr 10:43
beb0db8
Compare
Choose a tag to compare

📢 ANNOUNCEMENT 📢

Stata users can now run do-file on a remove server using GitHub Actions. Please check README for details because you need to fill some requirements (e.g. authorization, code, serial number).

In order to run properly, you have to create a do-file named main.do and put it into your root directory. It will trigger all of your workflows so that you don't have to manually change the configurations.

What you'll get:

  • Run do-file in a batch mode on a remote server using Linux kernel, which avoids cross-platforms headache
  • Automatically generate tables to LaTeX without having to install the distribution in your local machine, which can be a pain in the neck
  • Preview results by seeing the log-file. Your Stata serial numbers are encrypted so it should be safe and nobody could steal from you 🤞🏽

File issues or questions here.

Example

See how to use this package into YAML file in your repository:

Basic

In your repository, create a GitHub Actions workflow by clicking Actions tab -> New workflow -> and set up a workflow yourself. Note that uses: ledwindra@continuous-integration-stata@v1 indicates that you will be using this package.

name: Test CI Stata

on:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    
    - name: Stata Action
      id: ci-stata
      uses: ledwindra@continuous-integration-stata@v1
      with:
        url: ${{ secrets.URL }}
        version: ${{ secrets.VERSION }}
        serial-number: ${{ secrets.SERIAL_NUMBER }}
        code: ${{ secrets.CODE }}
        authorization: ${{ secrets.AUTHORIZATION }}
        first-name: ${{ secrets.FIRST_NAME }}
        last-name: ${{ secrets.LAST_NAME }}
        stata-edition: ${{ secrets.STATA_EDITION }}

With LaTeX support

Not every workflow needs LaTeX. But in case you do, just add the following snippet below the above code:

    - name: Install LaTeX and compile tex file to pdf
      run: |
        sudo apt-get install texlive-latex-base
        pdflatex [YOUR_LATEX_FILE].tex

Make a git commit

If you want to automatically update your repository after triggering this workflow, just add the following snippet below the above (with or without LaTeX) code:

    - name: Make a git commit
      env:
        EMAIL: ${{ secrets.EMAIL }}
        USERNAME: ${{ secrets.USERNAME }}
        
      run: |
        git status
        git config --global user.email ${EMAIL}
        git config --global user.name ${USERNAME}
        git add [WHAT YOU WANT TO ADD]
        git commit --allow-empty -m "YOUR COMMIT MESSAGE"
        git pull --rebase origin main
        git push origin main

Snippet

image